Count Specific Characters from String in JavaScript